<template>
  <div />
</template>

<script>
const arr = ['b', 'c', 'b', 'c', 'a', 'b', 'c']
const data = arr.reduce((obj, arr) => {
  if (arr in obj) {
    obj[arr]++
  } else {
    obj[arr] = 1
  }
  return obj
}, {})
console.log(data)

// {b:3, c:3, a:1}
</script>

<style>
</style>
